<?php

namespace App\Models\Fund;

use App\Models\BaseModel;
/**
 * 资金账户
 *
 * Class OperateReason
 * @package App\Models\Fund
 */
class OperateReason extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    public $table = 'operate_reason';
    public $appends = ['status_text','type_text'];
    public $typeText = ['freeze_fund'=>'冻结资金', 'freeze_currency'=>'冻结亚数币', 'freeze_integral'=>'冻结积分'];
    /**
     * Indicates if the model should be timestamped.
     * @var bool
     */
    public $timestamps = false;
    
      public function getTypeTextAttribute()
    {
        return $this->typeText[$this['type']];
    }

      public function getUserInfoAttribute($value)
    {
        return json_decode($value, true);
    }
   
    public function getOppositeInfoAttribute($value)
    {
        return json_decode($value, true);
    }
}
